import pandas as pd
#import json

"""
with open("/root/qianfeng/day6/huya.json", "r") as f:
    data = json.load(f)["vList"]
data=pd.DataFrame(data)
print(data)
"""

data = {
     '姓名': ['张三', '李四', '王五', '赵六'],
     '年龄': [28, 35, 42, 30],
     '工资': [12000, 15000, 10000, 14000],
     '城市': ['北京', '上海', '广州', '深圳'],
     '备注': ['学习Python', '喜欢编程', '喜欢数据', '喜欢沟通']
}

data=pd.DataFrame(data)
print(data)
with pd.ExcelWriter("/root/qianfeng/day7/info.xlsx") as writer:
    data.to_excel(writer)
print("数据已写入")

